package com.itcp.itelpicture.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itcp.itelpicture.domain.dto.community.CommentAddRequest;
import com.itcp.itelpicture.domain.dto.community.CommentQueryRequest;
import com.itcp.itelpicture.domain.po.User;
import com.itcp.itelpicture.domain.po.community.Comment;
import com.itcp.itelpicture.domain.vo.UserVO;
import com.itcp.itelpicture.domain.vo.communityVo.CommentVO;


/**
 * 社区评论服务
 */
public interface ICommentService extends IService<Comment> {
    


    /**
     * 分页获取一级评论列表
     * 
     * @param commentQueryRequest 查询条件
     * @return 分页结果
     */
    Page<CommentVO> rootCommentVOByPage(CommentQueryRequest commentQueryRequest);


    CommentVO getCommentVO(Comment comment, User user);

    /**
     * 分页获取二级评论列表
     *
     * @param commentQueryRequest 查询条件
     * @return 分页结果
     */
    Page<CommentVO> replyCommentVOByPage(CommentQueryRequest commentQueryRequest);

    /**
     * 添加评论
     * 
     * @param commentAddRequest 评论创建请求
     * @return 评论 ID
     */
    Long addComment(CommentAddRequest commentAddRequest);

    /**
     * 删除评论
     * 
     * @param id        评论 ID
     * @return 是否成功
     */
    boolean deleteComment(Long id);


}